import request from '@/request/request.js'

//管理员获取考试信息
export function adminExaminationList(data) {
    return request({
        url: '/groupOne/paper/getExaminationInfoList',
        method: 'post',
        data
    })
}

//获取管理员和老师信息
export function adminAdminAndTeacherList() {
    return request({
        url: '/groupOne/paper/getAdminAndTeacherInfo',
        method: 'post'
    })
}

//获取课程信息
export function adminSubjectList() {
    return request({
        url: '/groupOne/paper/getSubjectList',
        method: 'get'
    })
}
//管理员添加考试
export function adminExaminationAdd(data) {
    return request({
        url: '/groupOne/paper/addExaminationInformation',
        method: 'post',
        data
    })
}
//考试根据考试信息id查找考试信息
export function adminExaminationById(id) {
    return request({
        url: '/groupOne/paper/getExaminationInfoById/' + id,
        method: 'get'
    })
}
//管理员修改考试信息
export function adminExaminationUpdate(data) {
    return request({
        url: '/groupOne/paper/updateExaminationInformation',
        method: 'post',
        data
    })
}
//管理员根据考试信息id删除考试信息
export function adminExaminationDelete(data) {
    return request({
        url: '/groupOne/paper/delExaminationInfoById',
        method: 'post',
        data
    })
}

//管理员导出考试信息excel
export function exportOrder() {
    return request({
        url: '/groupOne/paper/exportFile',
        method: 'get',
        responseType: 'blob'
    })
}

//根据考试信息id查看这场考试的试卷内容
export function adminTestPaperById(id) {
    return request({
        url: '/groupOne/paper/getTestPaper/' + id,
        method: 'get'
    })
}
//根据学习阶段查询单元信息
export function getSubjectById(id) {
    return request({
        url: '/groupOne/paper/getSubjectById/' + id,
        method: 'get'
    })
}

//查询阶段信息
export function getLevelList() {
    return request({
        url: '/groupOne/paper/getLevelList',
        method: 'post'
    })
}
//回显阶段信息
export function getLevelById(id) {
    return request({
        url: '/groupOne/paper/getLevelById/' + id,
        method: 'get'
    })
}
//根据阶段信息查询学习阶段
export function getLPById(id) {
    return request({
        url: '/groupOne/paper/getLPById/' + id,
        method: 'get'
    })
}
//添加考试信息（自己选题）
export function addExaminationInformationBySelf(data) {
    return request({
        url: '/groupOne/paper/addExaminationInformationBySelf',
        method: 'post',
        data
    })
}
//获取所有的班级信息
export function getClassList() {
    return request({
        url: '/groupOne/paper/getClassList',
        method: 'get'
    })
}
//删除单个考试试卷中对应的题目
export function delQuestion(qid,eid) {
    return request({
        url: '/groupOne/paper/delQuestionById/'+qid+'/'+eid,
        method: 'get'
    })
}
//精准添加考试题目
export function addQuestion(qid,eid) {
    return request({
        url: '/groupOne/paper/addQuestion/'+qid+'/'+eid,
        method: 'get'
    })
}
//发布教学周期日考
export function addDailyExams(data) {
    return request({
        url: '/groupOne/paper/addDailyExams',
        method: 'post',
        data
    })
}
//讲师列表
export function getExaminationInfoListByTeacherId(tid,data) {
    return request({
        url: '/groupOne/paper/getExaminationInfoListByTeacherId/'+tid,
        method: 'post',
        data
    })
}

//管理员同意讲师发布试卷
export function passExamination(id) {
    return request({
        url: '/groupOne/paper/passExamination/'+id,
        method: 'get'
    })
}
//管理员驳回讲师发布试卷
export function rejectExamination(id,backCause) {
    return request({
        url: '/groupOne/paper/rejectExamination/'+id+'/'+backCause,
        method: 'get'
    })
}